USE [HomestayWebDB]
GO
/****** Object:  StoredProcedure [dbo].[Store_User_SelectUserbyUsername]    Script Date: 11/27/2012 13:08:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[Store_User_SelectUserbyUsername]
	@username varchar(20) = null
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
	SELECT
		  Users.Username
		, Users.Password
		, Users.Fullname
		, Users.RoleID
		, Users.AvatarPicture
		, Users.Gender
		, Users.Email
		, Users.Address
		, Users.Phone
		,Users.TimeCreated
		, Users.IsDeleted
		

	FROM Users
	WHERE Users.Username=@username AND IsDeleted='False'
END
